#ifndef _OPENNIGRABER_H
#define _OPENNIGRABER_H

#include <OpenNI.h>
#include <pcl/common/common_headers.h>
#include <pcl/visualization/pcl_visualizer.h> 

//深度设备名称枚举
enum DEVICEID
{
    DEVICE_ASTRA = 0,
    DEVICE_ASTRA_DEPPER = 1
};

class depthCapture
{
    public:
        depthCapture(DEVICEID ID);
        bool shutdown();
        bool getCloudXYZCoordinate(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_XYZ);
        bool isOpened();
        void operator >> (pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_XYZ);
    private:
        std::string deviceUri;
        int deviceId;
        std::string getDeviceUri();
        openni::Device mDevice;
        openni::VideoStream mDepthStream;
        bool is_opened;
};

void detectDevices();

#endif